package com.dragon.modules.yuegou.model.wallet;

import com.dragon.modules.yuegou.entity.wallet.MemberTradeEntity;
import com.dragon.modules.yuegou.enums.CurrencyType;
import com.dragon.modules.yuegou.enums.order.OrderType;
import com.dragon.modules.yuegou.enums.wallet.MemberTradeType;
import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 会员交易（在会员视角的交易流水）模型类
 * 
 * @author pbuilder generated
 * @date 2019-07-10 17:57:17
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MemberTrade extends MemberTradeEntity {

	@ApiModelProperty("手机号")
	private String mobile;
	
	@ApiModelProperty("昵称")
	private String nickName;
	
	@ApiModelProperty("交易消费方式 0-微信充值-WEIX、1-支付宝充值-ZFB、2-退款-TUIK、3-消费-XIAOF")
	private String transa;
	
	@ApiModelProperty("开始时间")
	private LocalDateTime createTimeBetweenS;
	
	@ApiModelProperty("结束时间")
	private LocalDateTime createTimeBetweenE;

	@ApiModelProperty("悦卡名称")
	private String cardName;

	@ApiModelProperty("积分")
	private String points;

	@ApiModelProperty("收入/支出:0-收入、1-支出")
	private String isIncome;
	
	@ApiModelProperty("收入总数")
	private BigDecimal income;
	@ApiModelProperty("支出收入总数")
	private BigDecimal expenditure;

	@ApiModelProperty("实际金额")
	private BigDecimal actualAmount;

	@ApiModelProperty("商品名称")
	private String skuTitle;

	@ApiModelProperty("卡类型")
	private Integer source;

	private OrderType orderType;

	public Integer getSource() {
		return source;
	}

	public void setSource(Integer source) {
		this.source = source;
	}

	public OrderType getOrderType() {
		return orderType;
	}

	public void setOrderType(OrderType orderType) {
		this.orderType = orderType;
	}

	public String getSkuTitle() {
		return skuTitle;
	}

	public void setSkuTitle(String skuTitle) {
		this.skuTitle = skuTitle;
	}

	public BigDecimal getActualAmount() {
		return actualAmount;
	}

	/**
	 * 设置实际金额
	 * @param actualAmount
	 */
	public void setActualAmount(BigDecimal actualAmount) {
		this.actualAmount = actualAmount;
	}

	public String getNickName() {
		return nickName;
	}

	public void setNickName(String nickName) {
		this.nickName = nickName;
	}

	public String getTransa() {
		return transa;
	}

	public void setTransa(String transa) {
		this.transa = transa;
	}

	public LocalDateTime getCreateTimeBetweenS() {
		return createTimeBetweenS;
	}

	public void setCreateTimeBetweenS(LocalDateTime createTimeBetweenS) {
		this.createTimeBetweenS = createTimeBetweenS;
	}

	public LocalDateTime getCreateTimeBetweenE() {
		return createTimeBetweenE;
	}

	public void setCreateTimeBetweenE(LocalDateTime createTimeBetweenE) {
		this.createTimeBetweenE = createTimeBetweenE;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public BigDecimal getIncome() {
		return income;
	}

	public void setIncome(BigDecimal income) {
		this.income = income;
	}

	public BigDecimal getExpenditure() {
		return expenditure;
	}

	public void setExpenditure(BigDecimal expenditure) {
		this.expenditure = expenditure;
	}

	public String getCardName() {
		return cardName;
	}

	public void setCardName(String cardName) {
		this.cardName = cardName;
	}

	public String getPoints() {
		return points;
	}

	public void setPoints(String points) {
		this.points = points;
	}

	public String getIsIncome() {
		return isIncome;
	}

	public void setIsIncome(String isIncome) {
		this.isIncome = isIncome;
	}

	/**
	 * 构造一个空会员交易（在会员视角的交易流水）模型对象
	 */
	public MemberTrade(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个会员交易（在会员视角的交易流水）模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberTrade(MemberTradeEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个会员交易（在会员视角的交易流水）模型对象
	 * 
	 * @param other 其它对象
	 */
	public MemberTrade(MemberTrade other){
		super(other);
	}


	@Override
	public String getId() {
    	return id;
    }

    /**
	 * 设置交易ID（与分表中的ID保持一致）
	 * 
	 * @param id 交易ID（与分表中的ID保持一致）
	 * @return 当前对象
	 */
    public MemberTrade id(String id) {
    	this.id = id;
    	return this;
    }

	@Override
	public String getMemberId() {
    	return memberId;
    }

    /**
	 * 设置会员ID
	 * 
	 * @param memberId 会员ID
	 * @return 当前对象
	 */
    public MemberTrade memberId(String memberId) {
    	this.memberId = memberId;
    	return this;
    }

	@Override
	public String getMemberWalletId() {
    	return memberWalletId;
    }

    /**
	 * 设置会员钱包ID
	 * 
	 * @param memberWalletId 会员钱包ID
	 * @return 当前对象
	 */
    public MemberTrade memberWalletId(String memberWalletId) {
    	this.memberWalletId = memberWalletId;
    	return this;
    }

	@Override
	public String getBusdId() {
    	return busdId;
    }

    /**
	 * 设置商圈ID（商户所在的商圈ID)
	 * 
	 * @param busdId 商圈ID（商户所在的商圈ID)
	 * @return 当前对象
	 */
    public MemberTrade busdId(String busdId) {
    	this.busdId = busdId;
    	return this;
    }

	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID，与商户交易时存在
	 * 
	 * @param merchantId 商户ID，与商户交易时存在
	 * @return 当前对象
	 */
    public MemberTrade merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getMerchantName() {
    	return merchantName;
    }

    /**
	 * 设置商户名称
	 * 
	 * @param merchantName 商户名称
	 * @return 当前对象
	 */
    public MemberTrade merchantName(String merchantName) {
    	this.merchantName = merchantName;
    	return this;
    }

	@Override
	public String getMemberCardId() {
    	return memberCardId;
    }

    /**
	 * 设置悦卡ID，会员使用悦卡交易时存在
	 * 
	 * @param memberCardId 悦卡ID，会员使用悦卡交易时存在
	 * @return 当前对象
	 */
    public MemberTrade memberCardId(String memberCardId) {
    	this.memberCardId = memberCardId;
    	return this;
    }

	@Override
	public String getOrderNo() {
    	return orderNo;
    }

    /**
	 * 设置订单号，订单支付时存在
	 * 
	 * @param orderNo 订单号，订单支付时存在
	 * @return 当前对象
	 */
    public MemberTrade orderNo(String orderNo) {
    	this.orderNo = orderNo;
    	return this;
    }

	@Override
	public CurrencyType getCurrencyType() {
    	return currencyType;
    }

    /**
	 * 设置[全局枚举]币种：0-悦币-YUE_COIN、1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT、3-微信-WECHAT、4-支付宝-ALIPAY
	 * 
	 * @param currencyType [全局枚举]币种：0-悦币-YUE_COIN、1-福利卡-YUE_CARD_GRANTED、2-预付卡-YUE_CARD_BOUGHT、3-微信-WECHAT、4-支付宝-ALIPAY
	 * @return 当前对象
	 */
    public MemberTrade currencyType(CurrencyType currencyType) {
    	this.currencyType = currencyType;
    	return this;
    }

	@Override
	public MemberTradeType getType() {
    	return type;
    }

    /**
	 * 设置[枚举]类型：0-充值悦币-RECHARGE_YUE_COIN、1-购买预付卡-BUY_YUE_CARD、2-发放福利卡-GRANT_YUE_CARD、3-订单支付-ORDER_PAY、4-订单退款-ORDER_REFUND、5-悦卡退卡-CARD_REFUND
	 * 
	 * @param type [枚举]类型：0-充值悦币-RECHARGE_YUE_COIN、1-购买预付卡-BUY_YUE_CARD、2-发放福利卡-GRANT_YUE_CARD、3-订单支付-ORDER_PAY、4-订单退款-ORDER_REFUND、5-悦卡退卡-CARD_REFUND
	 * @return 当前对象
	 */
    public MemberTrade type(MemberTradeType type) {
    	this.type = type;
    	return this;
    }

	@Override
	public BigDecimal getAmount() {
    	return amount;
    }

    /**
	 * 设置交易金额（正数表示收入，负数表示支出）
	 * 
	 * @param amount 交易金额（正数表示收入，负数表示支出）
	 * @return 当前对象
	 */
    public MemberTrade amount(BigDecimal amount) {
    	this.amount = amount;
    	return this;
    }

	@Override
	public BigDecimal getAmountBefore() {
    	return amountBefore;
    }

    /**
	 * 设置交易前余额
	 * 
	 * @param amountBefore 交易前余额
	 * @return 当前对象
	 */
    public MemberTrade amountBefore(BigDecimal amountBefore) {
    	this.amountBefore = amountBefore;
    	return this;
    }

	@Override
	public BigDecimal getAmountAfter() {
    	return amountAfter;
    }

    /**
	 * 设置交易后余额
	 * 
	 * @param amountAfter 交易后余额
	 * @return 当前对象
	 */
    public MemberTrade amountAfter(BigDecimal amountAfter) {
    	this.amountAfter = amountAfter;
    	return this;
    }

	@Override
	public String getRemarks() {
    	return remarks;
    }

    /**
	 * 设置交易备注
	 * 
	 * @param remarks 交易备注
	 * @return 当前对象
	 */
    public MemberTrade remarks(String remarks) {
    	this.remarks = remarks;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置交易时间
	 * 
	 * @param createdTime 交易时间
	 * @return 当前对象
	 */
    public MemberTrade createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public String getCompanyId() {
    	return companyId;
    }

    /**
	 * 设置企业id
	 * 
	 * @param companyId 企业id
	 * @return 当前对象
	 */
    public MemberTrade companyId(String companyId) {
    	this.companyId = companyId;
    	return this;
    }

	@Override
	public String getCompanyName() {
    	return companyName;
    }

    /**
	 * 设置企业名称
	 * 
	 * @param companyName 企业名称
	 * @return 当前对象
	 */
    public MemberTrade companyName(String companyName) {
    	this.companyName = companyName;
    	return this;
    }

	@Override
	public String getThirdMchId() {
    	return thirdMchId;
    }

    /**
	 * 设置第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501
	 * 
	 * @param thirdMchId 第三方商户号，与第三方商户号发生交易时存在，示例：微信商户号 wx_1501780391，微信服务商商户号 wx_1505108951_1533645041，支付宝商户号：ali_2088331430099501
	 * @return 当前对象
	 */
    public MemberTrade thirdMchId(String thirdMchId) {
    	this.thirdMchId = thirdMchId;
    	return this;
    }
}
